﻿@model DPW.Models.PoemCreateViewModel

@{
    ViewBag.Title = "Poem";
}

<h2>Poem</h2>




<script type="text/javascript">
    CKEDITOR.replace('#PoemContent');
    CKEDITOR.editorConfig = function (config) {
        ignoreEmptyParagraph = true;
    };

</script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Poem</legend>

        <div class="editor-label">
            Category
        </div>
        <div class="editor-field">
            <select name="Category" id="ddlCategory">
            @if(Model.Categories != null)
            {
                foreach (DPW.Business.Model.CategoryModel cat in Model.Categories)
                {
                    <option value="@cat.Id" title="@cat.Name">@cat.Name</option>
                }
            }
            </select>
        </div>

        <div class="editor-label">
            Poem Name
        </div>
        <div class="editor-field">
            <input type="text" name="PoemName" />
        </div>
        <div class="editor-label">
            Poem Content
        </div>
        <div class="editor-field">
            <textarea name="PoemContent" id="PoemContent" rows="20" cols="10"></textarea>
        </div>
        

        <p>
            <input type="submit" class="btn btn-primary" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

